<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:cc="http://java.sun.com/jsf/composite/controls"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/template/appTemplate.xhtml">
<ui:define name="topMenu">
	<cc:topMenu activeIndex="0"/>
	</ui:define>
	<ui:define name="left">
	<h:form id="codeTypeForm">
	<ul type="circle">
		<li>
		<a href="/admin/param.jsf">系统参数设置</a>
		</li>
		<li>
		<a href="/admin/code.jsf">基础数据设置</a>
		<ul type="circle">
		<li>
		<p:commandLink action="#{genericCodeCtrl.searchCodesByType}" value="全部" update=":codeTableForm:dataTable">
				<f:setPropertyActionListener target="#{genericCodeCtrl.currentType}" value=""></f:setPropertyActionListener>
			</p:commandLink>
			</li>
		<ui:repeat value="#{systemConfigBean.codeTypes}" var="codeType">
			<li>
			<p:commandLink action="#{genericCodeCtrl.searchCodesByType}" value="#{codeType.name}" update=":codeTableForm:dataTable">
				<f:setPropertyActionListener target="#{genericCodeCtrl.currentType}" value="#{codeType.codeId}"></f:setPropertyActionListener>
			</p:commandLink>
			</li>
		</ui:repeat>
	</ul>
		</li>
		<li>
		<a href="/admin/i18n.jsf">国际化设置</a>
		</li>
		<li>
		<a href="/admin/cache.jsf">缓存管理</a>
		</li>
	</ul>
	
	</h:form>
	</ui:define>
	<ui:define name="center">
	 <h:form prependId="false">  
                      
  
    <h:panelGrid columns="1" cellpadding="5">  
        <h:outputText id="msg" value=""/>  
          
        <p:commandButton id="showDialogButton" value="Destroy the World" onclick="confirmation.show()" type="button"/>  
    </h:panelGrid>  
      
   
  
</h:form>   
	</ui:define>
	<ui:define name="other">
    <p:growl id="messages" />  
	 <p:confirmDialog id="confirmDialog" message="Are you sure about destroying the world?"  
                header="Initiating destroy process" severity="alert" widgetVar="confirmation">  
                  
        <p:commandButton id="confirm" value="Yes Sure" update="messages" oncomplete="confirmation.hide()"  
                    actionListener="#{buttonBean.destroyWorld}" />  
        <p:commandButton id="decline" value="Not Yet" onclick="confirmation.hide()" type="button" />   
                  
    </p:confirmDialog>  
	</ui:define>
	<ui:define name="left">	
                    
	</ui:define>
</ui:composition>
</html>